package Test;

import static org.junit.Assert.*;
import leducHoldem.Data.Board;
import leducHoldem.Data.Move;

import org.junit.Test;

public class BoardTest {

	@Test
	public void getWinTestWithNonterminalBoard() {
		
		Board board = new Board(new Move("J"), new Move("Q"));
		
		board.makeMove(new Move("b"));
		
		assertEquals(0, board.getWinForPlayer((byte)1));
	}

	@Test
	public void getWinTestWithPlayerOneAsWinner() {
		
		Board board = new Board(new Move("J"), new Move("Q"));
		
		board.makeMove(new Move("b"));
		board.makeMove(new Move("c"));
		board.makeMove(new Move("J"));
		board.makeMove(new Move("b"));
		board.makeMove(new Move("c"));
		
		assertEquals(14, board.getWinForPlayer((byte)1));
		assertEquals(-14, board.getWinForPlayer((byte)2));
	}
}
